home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / etc / init.d / reboot < prev    next >
Text File  |  2008-10-14  |  639b  |  39 lines

  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides:          reboot
  4. # Required-Start:
  5. # Required-Stop:
  6. # Default-Start:
  7. # Default-Stop:      6
  8. # Short-Description: Execute the reboot command.
  9. # Description:
  10. ### END INIT INFO
  11.  
  12. PATH=/sbin:/usr/sbin:/bin:/usr/bin
  13.  
  14. . /lib/lsb/init-functions
  15.  
  16. do_stop () {
  17.     # Message should end with a newline since kFreeBSD may
  18.     # print more stuff (see #323749)
  19.     log_action_msg "Will now restart"
  20.     reboot -d -f -i
  21. }
  22.  
  23. case "$1" in
  24.   start)
  25.     # No-op
  26.     ;;
  27.   restart|reload|force-reload)
  28.     echo "Error: argument '$1' not supported" >&2
  29.     exit 3
  30.     ;;
  31.   stop)
  32.     do_stop
  33.     ;;
  34.   *)
  35.     echo "Usage: $0 start|stop" >&2
  36.     exit 3
  37.     ;;
  38. esac
  39.